﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB;
using Autodesk.Revit.Attributes;

namespace SPTest
{
    [Transaction(TransactionMode.Manual)]
    public class ShareFactoryTestCommand : IExternalCommand
    {
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            var doc = commandData.Application.ActiveUIDocument.Document;
            var uidoc = commandData.Application.ActiveUIDocument;
            var tran = new Transaction(doc);
            tran.Start("dd");
            ShareFactory.CreatePara(doc,new List<string>() {"空间类别"});
            tran.Commit();
            return Result.Succeeded;
        }
    }
}
